package com.yaoxuguang.concurrence.threadBase.currentThread;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.threadBase.currentThread
 * @Description: 测试currentThread()方法，返回调用当前代码的线程
 * @date 2018年12月17日14:43
 */
public class CountOperate extends Thread{
    public CountOperate(){
        System.out.println("CountOperate --- begin");
        System.out.println("Thread currentThread().getName()=" + Thread.currentThread().getName());
        System.out.println("this.getName="+this.getName());
        System.out.println("CountOperate --- end");
    }

    @Override
    public void run() {
        System.out.println("run --- begin");
        System.out.println("Thread currentThread().getName()=" + Thread.currentThread().getName());
        System.out.println("this.getName="+this.getName());
        System.out.println("run --- end");
    }
}
